package com.smart.tool.extension.model;

import com.smart.tool.extension.ExtensionType;

import java.util.Set;

/**
 * 扩展点场景
 */
public class ExtensionSence<T> {


    /**
     * 实现到扩展类
     */
    private Class<T> clazz;

    /**
     * 扩展点场景码
     */
    private String sence;

    /**
     * 扩展点使用点
     */
    private String useCase;

    private int order;

    private ExtensionType type;

    private Set<Class<?>> superClasses;


    private Set<Class<?>> interfaceClasses;



    private ExtensionSence() {}
    public Set<Class<?>> getSuperClasses() {
        return superClasses;
    }

    public void setSuperClasses(Set<Class<?>> superClasses) {
        this.superClasses = superClasses;
    }

    public Set<Class<?>> getInterfaceClasses() {
        return interfaceClasses;
    }

    public void setInterfaceClasses(Set<Class<?>> interfaceClasses) {
        this.interfaceClasses = interfaceClasses;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public static <T> ExtensionSence of(String sence,String useCase) {
        ExtensionSence extensionSence = new ExtensionSence();
        extensionSence.setSence(sence);
        extensionSence.setUseCase(useCase);
        return extensionSence;
    }

    public ExtensionType getType() {
        return type;
    }

    public void setType(ExtensionType type) {
        this.type = type;
    }

    public Class<T> getClazz() {
        return clazz;
    }

    public String getSence() {
        return sence;
    }

    public String getUseCase() {
        return useCase;
    }

    public void setClazz(Class<T> clazz) {
        this.clazz = clazz;
    }

    public void setSence(String sence) {
        this.sence = sence;
    }

    public void setUseCase(String useCase) {
        this.useCase = useCase;
    }
}
